package com.ele.client.activity.terminal.widget;

import com.google.gwt.core.shared.GWT;
import com.google.gwt.dom.client.Element;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Widget;

public class WordWidgetImpl extends Composite implements WordWidget {

    interface DefaultUiBinder extends UiBinder<Widget, WordWidgetImpl> {
    }

    private static DefaultUiBinder uiBinder = GWT.create(DefaultUiBinder.class);

    @UiField
    Element textLabel;
    @UiField
    Element translationLabel;

    public WordWidgetImpl() {
        initWidget(uiBinder.createAndBindUi(this));
    }

    @Override
    public void setText(String text) {
        textLabel.setInnerText(text);
    }

    @Override
    public void setTranslation(String translation) {
        translationLabel.setInnerText(translation);
    }
}
